Skip to content

Configure containers to run as non-root user #217

Merged
shaheislamdfe merged 1 commit intomasterfrom
2439-security-aks-containers-run-as-non-root-user-tech-guidance
Aug 26, 2025
Merged

Configure containers to run as non-root user #217
shaheislamdfe merged 1 commit intomasterfrom
2439-security-aks-containers-run-as-non-root-user-tech-guidance

Conversation

@shaheislamdfe
Copy link
Copy Markdown
Contributor

@shaheislamdfe shaheislamdfe commented Aug 25, 2025

This change addresses ITHC security recommendations that containers should:

  • Not run as root user
  • Not run with GID <= 10000
  • Not run with UID <= 10000

Changes:

  • Dockerfile: Create appuser/appgroup with UID/GID 10001 and set USER 10001
  • terraform/application/application.tf: Add run_as_user, run_as_group, and run_as_non_root settings to web_application module
  • terraform/application/variables.tf: Add run_as_non_root variable with default value of true

These changes ensure containers run securely on AKS hosts following best practices.
The Terraform configuration will be fully functional once terraform-modules PR #158
is promoted to stable.

Testing requirements:

  • Verify application starts without errors
  • Confirm no issues with worker processes (if applicable)
  • Full dev testing required to ensure no runtime permission issues
Screenshot 2025-08-25 at 15 13 55

@shaheislamdfe shaheislamdfe requested a review from a team as a code owner August 25, 2025 13:52
…ance

  This change addresses ITHC security recommendations that containers should:
  - Not run as root user
  - Not run with GID <= 10000
  - Not run with UID <= 10000

  Changes:
  - Dockerfile: Create appuser/appgroup with UID/GID 10001 and set USER 10001
  - terraform/application/application.tf: Add run_as_user, run_as_group, and run_as_non_root
   settings to web_application module
  - terraform/application/variables.tf: Add run_as_non_root variable with default value of
  true

  These changes ensure containers run securely on AKS hosts following best practices.
  The Terraform configuration will be fully functional once terraform-modules PR #158
  is promoted to stable.

  Testing requirements:
  - Verify application starts without errors
  - Confirm no issues with worker processes (if applicable)
  - Full dev testing required to ensure no runtime permission issues
@shaheislamdfe shaheislamdfe force-pushed the 2439-security-aks-containers-run-as-non-root-user-tech-guidance branch from 129e483 to 4d61bf5 Compare August 25, 2025 13:59
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 25, 2025

Review app for PR 217 was deleted

@shaheislamdfe shaheislamdfe changed the title Configure containers to run as non-root user for ITHC security compli… Configure containers to run as non-root user Aug 25, 2025
@shaheislamdfe shaheislamdfe merged commit f0809db into master Aug 26, 2025
4 checks passed
@shaheislamdfe shaheislamdfe deleted the 2439-security-aks-containers-run-as-non-root-user-tech-guidance branch August 26, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants